<template>
	<view class="transaction">
		<view class="main">
			<Order :status="status" />
			<OrderOpera :status="status" />
		</view>
	</view>
</template>
<script>
import Order from "./components/order.vue";
import OrderOpera from "./components/orderOpera.vue";

export default {
	components: {
		Order,
		OrderOpera,
	},
	data() {
		return {
			status: 3, // 1:立即上架 2:立即求购 3:立即购买
		};
	},

	watch: {
		status: {
			handler(val) {
				console.log(val);
                uni.setNavigationBarTitle({
                    title: val == 1 ? '寄售' : val == 2 ? '求购' : '购买',
                })
			},
			immediate: true,
		},
	},
};
</script>
<style lang="scss" scoped>
.transaction {
	width: 100%;
	height: 100vh;
	background: #000;
	padding: 40rpx;

	.main {
		width: 100%;
		height: calc(100% - 160rpx);
	}
}
</style>
